class LectureRating < ActiveRecord::Base
  belongs_to :lecture
  belongs_to :user

  validates :rating,  :presence => true
  validates :difficulty,  :presence => true
  validates :work_load,  :presence => true
  validates_numericality_of :rating, :only_integer => true, :message => "can only be whole number."
  validates_inclusion_of :rating, :in => 1..5, :message => "can only be between 1 and 5."
  validates_numericality_of :difficulty, :only_integer => true, :message => "can only be whole number."
  validates_inclusion_of :difficulty, :in => 1..5, :message => "can only be between 1 and 5."
  validates_numericality_of :work_load, :only_integer => true, :message => "can only be whole number."
  validates_inclusion_of :work_load, :in => 1..5, :message => "can only be between 1 and 5."

end
